package com.personal.book.service.impl;

import java.util.List;

import com.personal.book.dao.OrdersDetailsDao;
import com.personal.book.dao.impl.OrdersDetailsDaoImpl;
import com.personal.book.entity.OrdersDetails;
import com.personal.book.service.OrdersDetailsService;
import com.personal.tools.PageData;

public class OrdersDetailsServiceImpl implements OrdersDetailsService{
	OrdersDetailsDao odd = new OrdersDetailsDaoImpl();
	
	
	// 根据订单号查询订单详情
	@Override
	public PageData<OrdersDetails> getOrdersDetailsById(int page, int pageSize, int orderId) {
		// TODO Auto-generated method stub
		return odd.getOrdersDetailsById(page, pageSize, orderId);
	}


	@Override
	public boolean addOrdersDetailsInfo(OrdersDetails ordersDetails) {
		// TODO Auto-generated method stub
		if (ordersDetails!=null) {
			return odd.addOrdersDetailsInfo(ordersDetails); 
		}
		return false;
	}


	@Override
	public boolean addArdsTel(int orderId, String addr, String tel) {
		// TODO Auto-generated method stub
		if (addr != null && tel != null) {
			return odd.addArdsTel(orderId, addr, tel);
		}
		return false;
	}
	/**
	 * 用户查询订单详情
	 */
	@Override
	public List<OrdersDetails> getOrdersDetalsById(int orderId) {
		// TODO Auto-generated method stub
		return odd.getOrdersDetailsById(orderId);
	}
	
	@Override
	public List<OrdersDetails> getOrdersDetalsByName(String keys) {
		// TODO Auto-generated method stub
		return odd.getOrdersDetailsByName(keys);
	}
}
